how to write a floor function. There are any references about how to write a floor function in here. you can look below.